<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
					document.write("<center>");
					var h=Number(prompt("输入行数"));
					for(var i=1;i<=2*h-1;i++){
						var stars=2*h-1-2*Math.abs(i-h);
						for(var j=1;j<=stars;j++){
							document.write("*&nbsp");
						}
						document.write("<br>");
					}
					</script>
	</body>
</html>
